Print the numbers after removing even numbers¶
Print the numbers of a specified list after
removing even numbers from it.
N = [7, 8, 120, 25, 44, 20, 27]
N = [x for x in N if x % 2 != 0]
print(N) # [7, 25, 27]
N = [7, 8, 120, 25, 44, 20, 27]
N = [x for x in N if x % 2 != 0]
print(N) # [7, 25, 27]